/* KaoQingManagement.module.css */
.container {
  min-height: 100vh;
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  padding: 1.5rem;
}

/* 加载状态 */
.loadingContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 16rem;
}

.loadingContent {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loadingSpinner {
  animation: spin 1s linear infinite;
  border-radius: 50%;
  height: 3rem;
  width: 3rem;
  border-top: 2px solid;
  border-bottom: 2px solid;
  border-color: #6366f1;
  margin-bottom: 1rem;
}

.loadingText {
  font-size: 1.125rem;
  color: #4b5563;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 页面头部 */
.header {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8f0;
}

.headerContent {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.title {
  font-size: 1.875rem;
  font-weight: bold;
  color: #1e293b;
  margin-bottom: 0.5rem;
}

.currentCourse {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
  gap: 0.5rem;
}

.currentCourseLabel {
  color: #64748b;
}

.currentCourseValue {
  color: #4f46e5;
  font-weight: 500;
  background-color: #eef2ff;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.875rem;
}

.clearSelectionButton {
  margin-left: 1rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.875rem;
  color: #64748b;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
}

.clearSelectionButton:hover {
  color: #1e293b;
  background-color: #f8fafc;
}

.headerActions {
  display: flex;
  gap: 0.75rem;
}

.primaryButton, .secondaryButton {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.primaryButton {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
}

.primaryButton:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.secondaryButton {
  background: linear-gradient(135deg, #10b981 0%, #0d9488 100%);
  color: white;
}

.secondaryButton:hover {
  background: linear-gradient(135deg, #059669 0%, #0f766e 100%);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.buttonIcon {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.5rem;
}

/* 模态框 */
.modalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.modal {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  width: 100%;
  max-width: 32rem;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalSlideIn 0.2s ease-out;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(-10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modalHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  border-bottom: 1px solid #e2e8f0;
}

.modalTitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
}

.modalClose {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #64748b;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.2s;
}

.modalClose:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}

.modalBody {
  padding: 1.5rem;
}

.modalFooter {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.5rem;
  border-top: 1px solid #e2e8f0;
}

.cancelButton, .confirmButton {
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  font-weight: 500;
  transition: all 0.2s;
  cursor: pointer;
  border: none;
}

.cancelButton {
  background-color: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.cancelButton:hover {
  background-color: #f1f5f9;
  color: #1e293b;
}

.confirmButton {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
  color: white;
}

.confirmButton:hover {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

/* 表单样式 */
.formGrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.formGroup {
  display: flex;
  flex-direction: column;
}

.label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.input, .select {
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  transition: all 0.2s;
  background-color: white;
}

.input:focus, .select:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* 预览区域 */
.preview {
  background-color: #f8fafc;
  border-radius: 0.5rem;
  padding: 1rem;
  border: 1px solid #e2e8f0;
}

.previewTitle {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.75rem;
}

.previewIcon {
  width: 1rem;
  height: 1rem;
  margin-right: 0.5rem;
}

.previewGrid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.75rem;
}

.previewLabel {
  font-weight: 500;
  color: #64748b;
}

/* 区域样式 */
.section {
  background: white;
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #e2e8f0;
}

.sectionHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.sectionTitle {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
}

.sectionIcon {
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.5rem;
}

.selectionInfo {
  color: #64748b;
  font-size: 0.875rem;
  background-color: #f8fafc;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
}

/* 课程网格 */
.courseGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
  gap: 1rem;
}

.courseCard {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: center;
}

.courseCard:hover {
  border-color: #6366f1;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.courseCardSelected {
  border-color: #6366f1;
  background: linear-gradient(135deg, #eef2ff 0%, #f8fafc 100%);
}

.courseContent {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.coursePeriod {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1e293b;
}

.courseTime {
  font-size: 0.875rem;
  color: #64748b;
}

.courseName {
  font-size: 0.875rem;
  font-weight: 500;
  color: #4f46e5;
}

.courseCount {
  font-size: 0.75rem;
  color: #94a3b8;
}

/* 筛选网格 */
.filterGrid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
}

.filterGroup {
  display: flex;
  flex-direction: column;
}

/* 表格样式 */
.tableContainer {
  overflow-x: auto;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.tableHead {
  background-color: #f8fafc;
}

.tableHeader {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid #e2e8f0;
}

.tableBody {
  background-color: white;
}

.tableRow {
  border-bottom: 1px solid #e2e8f0;
  transition: background-color 0.2s;
}

.tableRow:hover {
  background-color: #f8fafc;
}

.tableRow:last-child {
  border-bottom: none;
}

.tableCell {
  padding: 1rem;
  color: #1e293b;
}

.tableCellBold {
  font-weight: 600;
}

.tableCellMuted {
  color: #64748b;
}

/* 状态徽章 */
.statusBadge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.statusPresent {
  background-color: #d1fae5;
  color: #065f46;
}

.statusAbsent {
  background-color: #fee2e2;
  color: #991b1b;
}

.statusLate {
  background-color: #fef3c7;
  color: #92400e;
}

.statusLeave {
  background-color: #e0e7ff;
  color: #3730a3;
}

/* 出勤率徽章 */
.rateBadge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
}

.rateExcellent {
  background-color: #d1fae5;
  color: #065f46;
}

.rateGood {
  background-color: #fef3c7;
  color: #92400e;
}

.rateFair {
  background-color: #fef3c7;
  color: #92400e;
}

.ratePoor {
  background-color: #fee2e2;
  color: #991b1b;
}

/* 计数样式 */
.presentCount {
  color: #065f46;
  font-weight: 600;
}

.absentCount {
  color: #991b1b;
  font-weight: 600;
}

.lateCount {
  color: #92400e;
  font-weight: 600;
}

.leaveCount {
  color: #3730a3;
  font-weight: 600;
}

/* 操作组 */
.actionGroup {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.statusSelect {
  padding: 0.25rem 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  background-color: white;
}

.deleteButton {
  padding: 0.25rem 0.75rem;
  background-color: #fee2e2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 0.375rem;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.deleteButton:hover {
  background-color: #fecaca;
  color: #b91c1c;
}

/* 空状态 */
.emptyState {
  text-align: center;
  padding: 3rem;
  color: #64748b;
}

.emptyIcon {
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  color: #cbd5e1;
}

.emptyTitle {
  font-size: 1.125rem;
  font-weight: 600;
  color: #64748b;
  margin-bottom: 0.5rem;
}

.emptyDescription {
  color: #94a3b8;
  font-size: 0.875rem;
}

/* 表格页脚 */
.tableFooter {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #e2e8f0;
}

.recordCount {
  color: #64748b;
  font-size: 0.875rem;
}

.recordCountNumber {
  font-weight: 600;
  color: #1e293b;
}

.lastUpdated {
  color: #94a3b8;
  font-size: 0.75rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
  .container {
    padding: 1rem;
  }
  
  .headerContent {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
  
  .headerActions {
    width: 100%;
    justify-content: flex-end;
  }
  
  .formGrid {
    grid-template-columns: 1fr;
  }
  
  .courseGrid {
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
  }
  
  .filterGrid {
    grid-template-columns: 1fr;
  }
  
  .modalFooter {
    flex-direction: column;
  }
  
  .tableFooter {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
  }
}
/* 最近考勤结果区域 */
.lastAttendanceResult {
  background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%);
  border-radius: 0.75rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid #ddd6fe;
}

.lastAttendanceHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.lastAttendanceTitle {
  display: flex;
  align-items: center;
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
}

.attendanceDate {
  color: #64748b;
  font-size: 0.875rem;
  background-color: #f8fafc;
  padding: 0.5rem 1rem;
  border-radius: 9999px;
}

/* 考勤统计数据 */
.attendanceStats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.statCard {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.statLabel {
  font-size: 0.875rem;
  color: #64748b;
  font-weight: 500;
}

.statValue {
  font-size: 1.5rem;
  font-weight: 700;
}

/* 考勤详情 */
.attendanceDetail {
  background: white;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  border: 1px solid #e2e8f0;
}

.attendanceDetailTitle {
  font-size: 1rem;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 0.75rem;
}

.leaveStudentsList {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.leaveStudentItem {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  padding: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.leaveStudentInfo {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.leaveStudentName {
  font-weight: 500;
  color: #1e293b;
}

.leaveStudentId {
  font-size: 0.75rem;
  color: #64748b;
}

/* 请假条图片查看 */
.leaveImageContainer {
  position: relative;
}

.leaveImage {
  width: 2rem;
  height: 2rem;
  border-radius: 0.25rem;
  cursor: pointer;
  border: 1px solid #e2e8f0;
  transition: transform 0.2s;
}

.leaveImage:hover {
  transform: scale(1.05);
}

/* 请假条大图模态框 */
.leaveImageModalOverlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 1rem;
  backdrop-filter: blur(4px);
}

.leaveImageModal {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.leaveImageModalContent {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 0.5rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.leaveImageModalClose {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
  padding: 0.25rem;
  border-radius: 0.25rem;
  transition: all 0.2s;
}

.leaveImageModalClose:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* 班级选择样式 */
.classSelection {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #f8fafc;
  border-radius: 0.5rem;
  border: 1px solid #e2e8f0;
}

/* 班级点名网格 */
.classAttendanceGrid {
  display: grid;
  gap: 1rem;
  max-height: 400px;
  overflow-y: auto;
}

.studentAttendanceItem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background-color: white;
}

.studentInfo {
  display: flex;
  flex-direction: column;
}

.studentName {
  font-weight: 600;
  color: #1e293b;
}

.studentId {
  font-size: 0.875rem;
  color: #64748b;
}

.attendanceActions {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.leaveImageUpload {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.uploadLabel {
  padding: 0.5rem 1rem;
  background-color: #e0e7ff;
  color: #3730a3;
  border-radius: 0.375rem;
  cursor: pointer;
  font-size: 0.875rem;
  text-align: center;
}

.fileInput {
  display: none;
}

.fileName {
  font-size: 0.75rem;
  color: #64748b;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* 班级网格样式 */
.classGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.classCard {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 1.5rem;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.classCard:hover {
  border-color: #6366f1;
  transform: translateY(-2px);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.classContent {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.className {
  font-size: 1.25rem;
  font-weight: 600;
  color: #1e293b;
}

.classInfo {
  display: flex;
  justify-content: space-between;
  color: #64748b;
  font-size: 0.875rem;
}

.studentCount, .attendanceCount {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.classAction {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #6366f1;
  font-weight: 500;
  margin-top: 0.5rem;
}

.arrowIcon {
  width: 1rem;
  height: 1rem;
}